﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master" CodeFile="UpdatePanelSample.aspx.cs" Inherits="UpdatePanelSample" %>
<%@ Register assembly="SCS.Toolbar" namespace="SCS.Web.UI.WebControls" tagprefix="SCS" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="Toolbar.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    /* used to demonstrate class swapping with client API */
    .toolbar .button_enabled2 a:hover
    {
        background-color: #EFF2F8;
        border: 1px solid #009933;
    }
    .toolbar .button_enabled2 a
    {
	    color: #1B3A7A;
    }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH1" Runat="Server">
    
    <div>
        
        <SCS:Toolbar ID="Toolbar1" runat="server" EnableClientApi="True" 
            CssClass="toolbar" 
            OnButtonClicked="Toolbar1_ButtonClicked"  
            Width="100%" 
            SelectionMode="Single" 
            OnClientButtonClick="toolbar_buttonClicked" >             
            
            <ButtonCssClasses 
                CssClass="button" 
                CssClassEnabled="button_enabled" 
                CssClassDisabled="button_disabled" 
                CssClassSelected="button_selected"/> 
                
            <Items>
                <SCS:ToolbarButton ImageUrl="~/Images/ctxwiz_cls.gif" Text="New" 
                    ToolTip="Create a new record" 
                    CommandName="CreateNew" 
                    CommandArgument="55" />   
                <SCS:ToolbarButton ImageUrl="~/Images/Delete.gif" Text="Delete"
                    ConfirmationMessage="Are you sure you want to delete?" 
                    ToolTip="Delete the record" 
                    CommandName="Delete" 
                    CommandArgument="99"/>
                <SCS:ToolbarButton ImageUrl="~/Images/Save.gif" Text="Save"
                    ToolTip="Save the record" 
                    CommandName="Save" 
                    CommandArgument="88"/>
                <SCS:ToolbarButton ImageUrl="~/Images/ctxhelp_hide.gif" Text="Help"
                    ToolTip="Help for this form" 
                    CommandName="GotoHelp" 
                    CommandArgument="77" />                      
            </Items>    
        </SCS:Toolbar>
        <br />
    
        <script type="text/javascript">
            
            function toolbar_buttonClicked(sender, eventArgs) {
            
                if (eventArgs.get_selectedIndex() == 2) {

                    var flag = confirm("Do you want to proceed?");
                    eventArgs.set_cancel(!flag);
                }
            }    
        </script>
    
        <asp:UpdatePanel ID="Updater" runat="Server">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Toolbar1" />
            </Triggers>
            <ContentTemplate>
            
                <asp:Label ID="newContent" runat="server" />
                
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
                The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. The fox jumped over the lazy dog. 
            </ContentTemplate>
        </asp:UpdatePanel>

    </div>
</asp:Content>
